<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            background: red;
            /* 动画名称 */
            /* animation-name: move; */
            /* 动画持续时间 */
            /* animation-duration: 2s; */
            /* 合并写法 */
            animation: move 2s;
        }

        /* 帧动画 */
        @keyframes move {

            /* 动画的开始 */
            0% {
                width: 100px;
                height: 100px;
            }

            30% {
                background: orchid;
                height: 400px;
            }

            /* 动画的结束 */
            100% {
                width: 800px;
                height: 100px;
                background: palegreen;
            }
        }

        /* from to 只能设置两帧动画,百分比 可以设置多帧动画 */
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>